<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
		<!-- 因为 AJAX 库和通用工具的生态已经相当丰富，Vue 核心代码没有重复 -->
		<!-- 提供这些功能以保持精简。这也可以让你自由选择自己更熟悉的工具。 -->
		<script src="https://cdn.jsdelivr.net/npm/axios@0.12.0/dist/axios.min.js"></script>
		<script src="https://cdn.jsdelivr.net/npm/lodash@4.13.1/lodash.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/velocity/1.2.3/velocity.min.js"></script>

	</head>
	<body>
		<div id="demo">
			<div>
				<input type="radio" name="radioSelect" checked="true" value="v-a" @click="view=$event.target.value" />
				<label>A</label>
				<input type="radio" name="radioSelect" value="v-b" @click="view=$event.target.value" />
				<label>B</label>
			</div>
			<transition name="component-fade" mode="out-in">
				<component v-bind:is="view"></component>
			</transition>
		</div>	
		<script type="text/javascript">
			 /**
			  * 多个组件过度
			  */
			 let app=new Vue({
				 el:'#demo',
				 data:{
					 show:true,
					 view:'v-a',
				 },
				 components:{
					 'v-a':{
						 template:'<div>Components A</div>'
					 },
					 'v-b':{
					 	template:'<div>Components B</div>'
					 }
				 },
				 methods:{
					
				 }
				 
			 })
		</script>	
		<style type="text/css">
			.component-fade-enter-active, .component-fade-leave-active {
			  transition: opacity .3s ease;
			}
			.component-fade-enter, .component-fade-leave-to
			/* .component-fade-leave-active for below version 2.1.8 */ {
			  opacity: 0;
			}
		</style>
	</body>
</html>
